package cn.dhnep.demo.controller;

import cn.dhnep.demo.pojo.Result;
import cn.dhnep.demo.pojo.entity.openId;
import cn.dhnep.demo.service.EnvironmentalGuardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author 邱文彬
 * @Date 2021/11/12 15:18
 * @Version 1.0
 */


@RestController
public class EnvironmentalGuardController {


    @Autowired
    private EnvironmentalGuardService environmentalGuardService;

//    根据openId获取用户的推广下级
    @RequestMapping(value = "getEnvironmentalGuardAllByOpenId",method = RequestMethod.POST)
    public Result getEnvironmentalGuardAllByOpenId(@RequestBody openId openId){

        return  environmentalGuardService.getEnvironmentalGuardAllByOpenId(openId.getOpenId(),openId.getPage(),openId.getRecord());
    }




}
